export function filterObj(obj, file) {
  let reg = file ? /^application/ : /^image/
  let arr = []
  for (let item in obj) {
    if (reg.test(item)) {
      arr.push(obj[item])
    }
  }
  let finalArr = []
  for (let newItem in arr) {
    for (let secondItem in arr[newItem]) {
      finalArr.push(arr[newItem][secondItem])
    }
  }
  return finalArr
}
